package cn.edu.ctbu.service;

import cn.edu.ctbu.DTO.OrderDTO;
import cn.edu.ctbu.DTO.PaySuccessDTO;
import cn.edu.ctbu.DTO.RejectOrdersDTO;
import cn.edu.ctbu.VO.*;
import cn.edu.ctbu.entity.OrderDetail;
import cn.edu.ctbu.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author author
 * @since 2024-05-12
 */
public interface IOrdersService extends IService<Orders> {

    List<OrdersVO> get(String number, String phone, LocalDate startTime, LocalDate endTime);

    OrderDetailVO detail(Long id);

    void receive(Long id);

    void reject(RejectOrdersDTO dto);

    void delivery(Long id);

    void complete(Long id);

    void delete(Long id);

    void cancel(RejectOrdersDTO dto);

    TurnoverVO turnover(LocalDate startTime, LocalDate endTime);

    OrderStatisticsVO orders(LocalDate startTime, LocalDate endTime);

    CountVO counts(LocalDate startTime, LocalDate endTime);

    List<Orders> day(LocalDate time);

    String postOrder(OrderDTO dto);

    PayOrdersVO getByNumber(String number);

    void paySuccess(PaySuccessDTO dto);

    List<OrderDetail> getOrdersDetailByNumber(String number);

    void cancelOrders(String number);

    void remind(Long id);

    void refundOrders(String number);

    OrderDetailVO detailByNumber(String number);

    List<OrderDetailVO> getOrdersList(String search);
}
